//
//  OEPaySuccessViewController.m
//  OneEightyNine
//
//  Created by apple on 2019/3/4.
//  Copyright © 2019 stoneobs. All rights reserved.
//

#import "OECommitOrderSuccessViewController.h"
#import "OEOrderViewController.h"
@interface OECommitOrderSuccessViewController ()

@end

@implementation OECommitOrderSuccessViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = OESTRING(@"RESULTS OF SUBMISSION");
    [self configSubView];
    // Do any additional setup after loading the view.
}
#pragma mark --subView
- (void)configSubView{
    __weak typeof(self) weakSelf =  self;
    UIView * footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, UIScreenWidth, 100)];
    footer.backgroundColor = self.tableView.backgroundColor;
    
    UIImageView * imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"120×128付款成功"]];
    imageView.top = 100;
    imageView.centerX = UIScreenWidth / 2;
    [footer addSubview:imageView];
    
    STLabel * titleLable = [[STLabel alloc] initWithFrame:CGRectMake(0, imageView.bottom + 40, UIScreenWidth, 44)
                                                     text:OESTRING(@"SUBMISSION OF SUCCESS")
                                                textColor:UIColor.blackColor
                                                     font:20
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentCenter];
    [footer addSubview:titleLable];
    
    
    STLabel * stitleLable = [[STLabel alloc] initWithFrame:CGRectMake(0, titleLable.bottom + 20, UIScreenWidth, 44)
                                                      text:[NSString stringWithFormat:@"PICK UP TIME %@",self.time]
                                                 textColor:SecendTextColor
                                                      font:14
                                               isSizetoFit:NO
                                             textAlignment:NSTextAlignmentCenter];
    [footer addSubview:stitleLable];
    stitleLable.attributedText = [stitleLable.text st_convertAttributeStringWithKeyWord:self.time attributes:@{NSForegroundColorAttributeName:OE_LIMITE_COLOR}];
    
    STButton * confimButton = [[STButton alloc] initWithFrame:CGRectMake(30, stitleLable.bottom + 40, UIScreenWidth - 60 , 44)
                                                        title:@"VIEW THE ORDER"
                                                   titleColor:[UIColor whiteColor]
                                                    titleFont:18
                                                 cornerRadius:22
                                              backgroundColor:OE_LIMITE_COLOR
                                              backgroundImage:nil
                                                        image:nil];
    [confimButton setClicAction:^(UIButton *sender) {
        [weakSelf.navigationController pushViewController:OEOrderViewController.new animated:YES];
    }];
    confimButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
    [footer addSubview:confimButton];
    
    footer.height = confimButton.bottom;
    self.tableView.tableFooterView = footer;
}

@end
